package inet.app.model.util;
public class Mobile {
	private final String[] VINA = {"091","094","0123","0125","0127","0129",""};
	private final String[] VIETTEL = {"097","098","0169","0168","0167","0166","0165","0164","0163"};
	private final String[] MOBI = {"090","093","0122","0126","0128","0121","0120"};
	private final String[] VIETNAMMOBILE = {"092","0188"};
	private final String[] BEELINE = {"0199"};
	private final String[] SFONE = {"095"};
	private final String[] EVN = {"096"};
	
	public Mobile () {
		
	}
	
	
	public String getMobile(String mobile) {
		String mang="";
		for(int i=0;i<VINA.length;i++) {
			if(mobile.indexOf(VINA[i])==0)
			{
				mang="vina";
				break;
			}
		}
		for(int i=0;i<VIETTEL.length;i++) {
			if(mobile.indexOf(VIETTEL[i])==0)
			{
				mang="viettel";
				break;
			}
		}
		for(int i=0;i<MOBI.length;i++) {
			if(mobile.indexOf(MOBI[i])==0)
			{
				mang="mobi";
				break;
			}
		}
		for(int i=0;i<VIETNAMMOBILE.length;i++) {
			if(mobile.indexOf(VIETNAMMOBILE[i])==0)
			{
				mang="vmm";
				break;
			}
		}
//		for(int i=0;i<BEELINE.length;i++) {
//			if(mobile.indexOf(BEELINE[i])==0)
//			{
//				mang="BEELINE";
//				break;
//			}
//		}
//		for(int i=0;i<EVN.length;i++) {
//			if(mobile.indexOf(EVN[i])==0)
//			{
//				mang="EVN";
//				break;
//			}
//		}
//		for(int i=0;i<SFONE.length;i++) {
//			if(mobile.indexOf(SFONE[i])==0)
//			{
//				mang="SFONE";
//				break;
//			}
//		}
		return mang;
	}
	
}
